<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="basePath" value="${pageContext.request.contextPath}"></c:set>

<html>
<body>
<form action="${pageContext.request.contextPath }/admin/template/uploadTemplate" method="post" enctype="multipart/form-data">
    <input type="text" name="template_name"   placeholder="请输入模板名称">
    <input type="file" name="multipartFile">
    <button type="submit" >提交</button>
</form>

<button onclick="showTemplate();">测试</button>

<script src="${basePath }/static/plugins/jq/jquery-2.2.4.min.js"></script>
<script>

    function showTemplate(){
        $.ajax({
            url: '${pageContext.request.contextPath }/admin/template/showTemplate',
            type: 'post',
            dataType: 'json',
            data:null,
            success: function(resp){

            }
        })
    }

</script>
</body>
</html>
